#include "visualizadorAbstrato.h"
#include "visualizadorFilaStl.h"

//------------------------------------------------------------------------------
visualizadorFilaStl::visualizadorFilaStl(float ax,float ay):visualizadorAbstrato(ax,ay)
{
	flaFilaStl = new FilaStl;
};
//------------------------------------------------------------------------------
visualizadorFilaStl::~visualizadorFilaStl()
{
	delete flaFilaStl;
	flaFilaStl = NULL;
};
//------------------------------------------------------------------------------
void visualizadorFilaStl::desenha(TImage *area,double escalaX,double escalaY)const
{
		area->Canvas->Brush->Color = clBlue;
		area->Canvas->Rectangle((getX())*escalaX,(getY())*escalaY,(getX()+44)*escalaX,(getY()+44)*escalaY);
		if (escalaX == 1)
		{
				area->Canvas->Brush->Color = clWhite;
				area->Canvas->Rectangle((getX()+5)*escalaX,(getY()+10)*escalaY,(getX()+13)*escalaX,(getY()+18)*escalaY);
				area->Canvas->Rectangle((getX()+10)*escalaX,(getY()+15)*escalaY,(getX()+18)*escalaX,(getY()+23)*escalaY);
				area->Canvas->Rectangle((getX()+15)*escalaX,(getY()+20)*escalaY,(getX()+23)*escalaX,(getY()+28)*escalaY);
				area->Canvas->Brush->Color = clWhite;
				area->Canvas->TextOutA((getX()+6)*escalaX,(getY()+29)*escalaY,"FilaStl" +IntToStr(getIdentidade()));
		}
};
//------------------------------------------------------------------------------
void visualizadorFilaStl::interage()
{
	TfrmFilaStl * frmFilaStl = new TfrmFilaStl(Application, flaFilaStl);
	frmFilaStl->ShowModal();
	delete(frmFilaStl);
	frmFilaStl = NULL;
};

